<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>02-thymeleaf列表渲染</title>
</head>
<body>

<table border="1px" rules="all" cellspacing="0px" cellpadding="10px" width="400px" height="300px">

    <tr>
        <td>状态</td>
        <td>编号</td>
        <td>姓名</td>
        <td>密码</td>
    </tr>

    <tr th:each="user ,state : ${userList}">
        <td th:text="${state.index}"></td>
        <td th:text="${user.userId}">编号</td>
        <td th:text="${user.userName}">姓名</td>
        <td th:text="${user.userPwd}">密码</td>
    </tr>

</table>


</body>
</html>